package com.wyj.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wyj.mapper.YlrcMenuMapper;
import com.wyj.pojo.YlrcMenu;

import com.wyj.service.YlrcMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author mac
* @description 针对表【ylrc_menu】的数据库操作Service实现
* @createDate 2022-11-18 21:04:46
*/
@Service
public class YlrcMenuServiceImpl extends ServiceImpl<YlrcMenuMapper, YlrcMenu>
implements YlrcMenuService {

    @Autowired
    YlrcMenuMapper ylrcMenuMapper;

    @Override
    public int addMenu(YlrcMenu ylrcMenu) {
        int insert = ylrcMenuMapper.insert(ylrcMenu);
        if (insert >= 0) return 1;
        return 0;
    }

    @Override
    public int deleteMenu(int id) {
        int i = ylrcMenuMapper.deleteById(id);
        if (i >= 0) return 1;
        return 0;
    }
}
